import numpy as np
# 定义Geo-Indistinguishability算法函数
def geo_indistinguishability(x, epsilon, delta):
    # 计算扰动噪声
    sigma = np.sqrt(2 * np.log(1.25 / delta)) / epsilon
    noise = np.random.normal(loc=0.0, scale=sigma, size=x.shape)

    # 添加噪声并返回扰动后的结果
    print(noise)
    return x + noise

x = np.array([10000.0, 2.0, 3.0, 4.0, 5.0])
geo_indistinguishability(x,0.5,1e-5)